<template lang="html">
  <div class="feiyong2">
    <!-- 头部 -->
    <div class="top2_2">
      <img @click="back()" src="../../static/imgs/left2.png" alt="">
      <span>费用说明&预定须知</span>
    </div>
    <!-- 内容 -->
    <div class="server2Yes" v-for="item of object">
      <p class="feiyong_1"><img src="../../static/imgs/shu2.png" alt="">{{item.serviceType}}</p>
      <div class="feiyong_2">
        <p v-for="i of item.serviceContent.split('\r\n')">{{i}}</p>
      </div>
    </div>
  </div>
</template>

<script>
import bus from "../js/bus.js"
export default {
  data(){
    return{
      object:''
    }
  },
  methods:{
    back(){
      history.back();
      bus.$emit('datas','hei');
    }
  },
  created() {
      // 给vm添加事件
      bus.$on('data', (data)=> {
          this.object=data;
      });
  }
}
</script>

<style lang="css">
.feiyong2{
  background: #f5f5f5;
}
.top2_2{
  text-align: center;
  background: #00b0ec;
  line-height: 5rem;
  font-size: 1.7rem;
  position: relative;
  color: #fff;
}
.top2_2 img{
  position: absolute;
  left: 1rem;
  top: 1.2rem;
  width: 8%;
}
.server2Yes{
  text-align: left;

}
</style>
<style scoped>
  .top2_2{
    position: fixed;
    top: 0;
    width: 100%;
  }
  .feiyong_1{
    margin-top: 1.2rem;
    font-size: 1.5rem;
    padding: 1.2rem;
    border-bottom: 1px solid #999;
    background: #fff;
  }
  .feiyong_1 img{
    vertical-align: bottom;
    width: 6%;
  }
  .feiyong_2{
    background: #fff;
    padding: 1.2rem;
    line-height: 2rem;
  }
  .feiyong2>div:nth-of-type(2){
    margin-top: 5rem;
  }
  .feiyong_2>p:last-child{
    margin-bottom: 6rem;
  }
</style>
